.custom-message {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: white;
  min-width: 320px;
  max-width: 500px;
  font-size: 14px;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid;

  &.success {
    border-left-color: #52c41a;
    .message-icon.success {
      color: #52c41a;
    }
  }

  &.error {
    border-left-color: #ff4d4f;
    .message-icon.error {
      color: #ff4d4f;
    }
  }

  &.warning {
    border-left-color: #faad14;
    .message-icon.warning {
      color: #faad14;
    }
  }

  &.info {
    border-left-color: #1890ff;
    .message-icon.info {
      color: #1890ff;
    }
  }

  .message-icon {
    font-size: 16px;
    flex-shrink: 0;
  }

  .message-content {
    flex: 1;
    color: #333;
    line-height: 1.4;
    word-break: break-word;
  }

  .message-close {
    color: #999;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
    transition: color 0.2s;

    &:hover {
      color: #666;
    }
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 当有多个消息时的样式 */
.message-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
